Bidirectional support for protocols cleaned up.
Some real database modelling done (in a preliminary way)