Did some refacroting