added automated mocha test to catch the last error i just commited (regression on old gulp file manual tests). fixed that bug with async handleDeclaration callback. refactored mocha tests.