Cleaned up a few more functions.