Working on tests; not yet complete but it's a good start