Updated to use main module