Fixing compilation issues, still working out some kinks