Fix linting issues

This PR fixes a few linting issues and makes the module slightly more consistent.