Some new test added. Fixed exceptions.