Clean up some function calls to make it cleaner