#18 storing events when they are created.

Also introduced mockery to mock db-access. Here we probably
need better modularisation and/or better dependecy management
(injecting of deps?).