Now compiles for me with some minor changes