Moved tests from inst/tests/ to tests/ and updated to run at R check
Fix to error on flatten of empty object