Code with errors. Converting the code more modular. Before removing old classes.