More small changes. Now compiles and can mine blocks.