Refactoring

Throw an error if no tags were found or wrong ids have been given in the params (i.e. in the url)