Minor refeactoring