Moved tests and added integration tests.