removed bunch of unused code