adminspace and db refactor