Changing prototypes to allow basePath passing