minor code cleanup and style change