cleanup code, remove some unneeded stuff