Minor code changes, test update