cleaned up some ancient code