cleaned up `settags()`.
used local vars and improved code readability.
Merge pull request #64 from mlloreda/scope_cleanup

cleaned up `settags()`.