Cleaned up code and renamed .py file to more appropriately reflect functionality