improved get category and tags functions. fixes #1