Store net updates directly into result variables
Moved function documentation to function declarations