Fixed summary bugs; expanded unit tests