Cleaned up code and removed unneeded classes.