Lint

Style and minor bug fixes.