Update to improve functionality and modularity