added hours quantity to appointment plus some refactoring