Fixed path and refactored another file