[CORE][minor] minor code cleanup and small modifications