Refactor tag reading and writing