Add pip requirements file and solve some coding style issues