Current autogen code, db stuff removed