fix tag parsing to handle all cases
refactor to use cursors and flesh out tag editor