Another commit with many small fixes [Urgent]

Lots of small fixes, read through the detailed commit messages ;) 

It seems some of my changes from last time were overwritten. Can this be merged first so that any conflicts are chosen from this request rather than the other outdated ones? I'll be happy to fix conflicts if it is possible.