cast turned into call to make it synchronous
general mistakes fixed
some things added only for debugging
Merge branch 'master' of github.com:affo/smart_alloc_simulator