Updated comments and cleaned up