Converted more functions to accept objects