Cleans up code, fixes classes