Fixes and improvements for the calculator example