Code refactoring and call chain support added