Refactor result() function for clarity and consistency.
Refactor result() function for clarity and consistency.

cjungmann/schemafw,cjungmann/schemafw,cjungmann/schemafw,cjungmann/schemafw,cjungmann/schemafw