some code clean up and stuff...

some code clean up and stuff...