Added tags, added comments, refactored.