Bug fixes and linting.