Using promise as go callback return value and some fixes.