Fixed out of map collision bug and cleaned up