Fixed a lot of bugs
Tidy up code slightly
Merge remote-tracking branch 'origin/master'