Restructured modules to better abstraction