Initial cleanup of the code.