More refactoring -- started on cellular automata