Fix PutTokens parsing for Abhorrent Overlord
Move debug functions into a separate module