Fixed one bug
Added a feature to take out parts of JS path