Added more comments and removed debugging tools