fixup! code cleanup

Fixed issues pointed out in the code review.