working database structure + basic context helpers

The database structure is for the moment working as expected and has been
refactored to be closer to the ideal structure. Several considerations
have taken effect in the journals part.

A basic context has been provided.

Still wip/prototype at this point in time.