reorganization and fix template abstraction
added users