Fork of teslalib from https://code.google.com/p/teslalib/