some fixes and changes, starting to work on a databse backbone