Cleaned up and commented tagsystem.py