pylint check for the code, fixed indents and other stuff

This time code is actually tested before committing :)

Signed-off-by: Jukka Laukkanen <jukkalau@gmail.com>