Split off model. Added request handling code.

The model was added to it’s own file and model directory for more easy
refactoring later. The request handling code has replaced the mockups.
Also added connection pooling to the database definition.