Add q library and introduce promises
Remove trailing console.log