update dependencies
update comment note
refactor and fix bugs

implementation of q and promises wasn't corrected in some places
refactor stupid code