Moved positional arrays into function for easier tracking. Also removed extra debug messages to cut down on spam