Final Submission: code commented, cleaned, tested.