Begun tidying code to meet with PEP 8 guidelines