Rename and inline some functions