fixes #55 and some linting