bug fixes and updates

- added stricter tests
- implemented a memoize function to speed up casts
- added a 'Moment' cast type