Some fix including duplicate of declaration and missing parameters