Support custom names and types. Closes #4 and #9.