severl code clean ups