Refactored to fewer functions, simplified function naming schema and fully commented all functions
Testing