Adapted requested changes from code review