some code clean ups