Applied pep8 and added legend to the plots