Move PIT code into util.coffee