Mostly compiles now, but still linking errors