Fixed lots of bugs ;)