Cleaner function code formatting