Conformed to PEP8 and added test methods