Initial version from https://code.google.com/p/t-pot/