Minor code optimizations.
Update QueryResult to be more conform usability.
Update interface to represent code optimizations.