Further cleaning up the code. Removing unused code.