minor changes, code clean up