Cleaning up code
Adding comments to functions
Generalizing code - need to update local app