Add some comments + some refacroting