Cleaned up the code, revised comments