Finished cleaning code.

All unnused items have been removed.