fixed issues with Item definitions
fixed up bugs in createPatrolPath function. createPatrolPath is not nearly as fast as it could possibly be but it does the job