modularity and style improvements