Fixed some bugs, compiles now