Refactored code using Q library for asynchronous programming with promises.
Indentation
Merge pull request #9 from rochimensi/rmensi/20140619/CreateAPIimplementation

Rmensi/20140619/create ap iimplementation