Crazy ass refactor

Moved things into slightly more logical packages, renamed a few
things and added main.go