Some refactoring. Adding support to specify block when defining command for extra initializaiton.