Reorganisation time

Maybe this'll make things a bit less messy.

Signed-off-by: Anton Lofgren <anton.lofgren@gmail.com>