Lint code and add more documentation