Code for TTBL-Alpha http://letsmakerobots.com/node/40464