Refine some features & add spec

This could easier be

    BASE_URL[type] || BASE_URL[:main]