Documentation updated and some refactoring

addParameter function updated