Landscape code quality improvements

Some code style isses was found by [landscape.io](https://landscape.io) service.

This is a fix for some of these.