Improve code modularity