Better classes

Fixed a bunch of bugs