moved tests from inst/tests/ to tests/testthat
added any missing and fixes tests, fixed dependencies