Merged functions for cleaner code.