Tidied up, moved things around and made it compile. Still no tests