Add parsing of custom elements

Closes #10