Few changes

-   Changed chunk to a function
-   Changed how success callbacks are added
-   Commit def is resolved with objects
-   Added console.error to transaction reject