Fix erroring and failing functional tests

Signed-off-by: Alex Coles <alex@alexbcoles.com>
Add simplecov for measuring code coverage

Signed-off-by: Alex Coles <alex@alexbcoles.com>
First pass to improve functional test coverage

Signed-off-by: Alex Coles <alex@alexbcoles.com>