Fixed a small bug. And it compiles. Hasn't been tested of course, but compiles.