Fixed compile errors

Now to actually test!