Basically working now

There are still some things that need fixing, files that should be
renamed etc, but working pretty well.