Some minor refactoring + removing unused/commented code