Generalized the parameters to be passed. Increased the comfort for users. Fixed bugs.