fix build + various minor touch ups