code cleanup, style update