Added comments
Added support for dependencies and callbak i define(). Fixed the tests