Minor test tweaks and corrections
Added more tests and fixed minro bugs