Updated and added tests.