Automata and Algebras in Categories