delinting and other refactoring