big refactoring, moving almost all async code to Q promises system