Cleaned up the function.