Add Unit Testing

Will merge in when finished.
Just putting the PR here for discussion.