moving tests to inst/tests; cleaning up some failing tests