Cleaned up code and removed unnecessary comments.