Refactor to use a new Vector class.

closes #17