cleanup code, remove deprecated things