Reformat to follow PEP8, added messages