refactors old tests and adds some new