Massive Changes
Increased readability, organization, and added more error checking.