Added index.
Added q for promises.
Add constructor and method documentation.