balance() API, fix for functions that return a value (e.g. transactions()) & support for Google App Engine