Code and functions clean up.