This could probably be done better, will fix later
Fixed #28
Merge pull request #32 from KittyTristy/working

Fixed #28, also did other things