Lots of fixes & improvements