Working with tests, needs refactor