Cleaned up the code. Commented out most of the test blocks. Left some for further testing.