Changed function optional parameters pattern. Changed the order of dependencies.