Implemented optional parameter injection and API cleanup