Version 1.1.2

Fixed a lot of bugs
Cleaned up code