Refactor functions which are trivial.