Formatting according to pep8 and added encoding declaration at the top of each file.