Tags implementation

Added documentation, and changed some method names.