refactor and add support for new types
Merge pull request #60 from ndawe/refactor

refactor and add support for new types