Lots of bugs fixed!