Refactoring + Deleting unused code + Parametrable logging