* rolls back some of the ref changes * adds utility to calculate stack sizes * works around bugs in nim exception handling and rvo