added support of calling done several times and executing all those callbacks on future resolution
refactored ugly initialization process on page loading on browser side using Futures
code become cleaner and safer there