Cleaned up duplicate and unneccessary function calls.