Added a rakefile for linting the sources.
Fixed some linting and improved the linter.