Fork from code.google.com/p/rog-go