fixed an uncaught merge conflict, removed some old code