Jiggled some things around and got static initialisation to work with some hackery, and tidied some things up a little. This still isn't good, I'll probably change it again :(