Code refactored

Deleted unused things, changed some deprecated classes.