Various fixes & clean up