Changed so that it mostly compiles!