Restructured database & added additional API

see server/api/readme.txt for more details