Removed deprecated stuff and fixed the build