Made tests pass. On to UI next!