[Fixed #29] Path problem (code refactoring)