Major refactor into separate test packages