Lots of fixes ;)