Cleaned up the code, removed unnecesary comments