core rebuild, divided into configuration, added simple ruter, removed unused stuff