Improved structure in code