Cleaned up some code for deliverable