UNBREAK / Master

Fixed loads of bugs to unbreak the master branch
Merge branch 'Unbreak-master'