Fixing many minor issues
Merge branch 'refactoring-promises'
Core: Log error stack trace