removed a lot of unused defuns