Implemented return values (refs #194, #186, #187).