Refactoring to get rid of the basepath tag