Removed unused Promise.
Removed unused "var self = this".