Added/Moved helper functions