Turn more methods into functions