Clean-up

Cleaned up unusable code, deleted debugging code, indented functions to
make them more readable.