added a devmode, and a few other goodies