Implemented promise & removed setTimeout from path controller.

Since, I've reached the weekly limit so I'm sending this PR.

It is partially done but still should pass all the tests.