Improved structure and readability of code