Refactor tests into subpackage, Add new tests