structuring code, making it look less messy