Make rbc helpers use signed ints and improve debug helpers a bit.