Crap load of bug fixes