Finished cleaning up code.