(refactor) added ability to read inline tags and parse empty tags