added a check that a definition exists on compile time
fixed bug in isInject which caused it not to work with yaml configuration
added light syntax for defining factories in yaml