Code cleanup. Ignoring tests for now.