Finished off domain and added integration tests