added an extension global, played with some constants, cleaned up some comments