objects refactor
replased a if else chain with a switch
added some error handeling to getTags()
Use the new GetTags to build directory listings in GetTags