Database

Fixed lots of stuff in the database some calls are not only handled buy the engine instead of calls from both the gui and the database, also fixed a few bugs ...