Bug fixes, also it compiles now