Converted a few functions to a pointfree style.