Fix whitespace and a few small issues