Added comments, renamed functions to ar, and implemented collision points