Clean up and commenting of code.