Rebase onto refactor/tests