Added new functionality for ninjajs