Separating common functions into this library.