Transfer code from https://code.google.com/p/groovycpe/ (without history - there is no history to speak of)