Refactor towards the metric views

A lot of refactoring work is ahead of me. This is the start for
overhauling the structure to the new design and API.

Signed-off-by: Konrad Reiche <konrad.reiche@gmail.com>