Cleaned a couple duplicate functions.