FIXED: lots of small fixes