Lots of small bug fixes, I just want to let other people play with this