Move account functions into functions.