code cleanup + stye changes
small modifications and code corrections.