More bug fixing and test updates.