Add tests to cover bug fixed and partially cover features added.