Refactor code for readability (ha)