Clean up the code and added more comments.