Implemented major refactor using Promises, including new SuperJS.Error class.