Make the main script load on-demand

Change-Id: I93bb46e6589f0496b5b7cdecddd45fec62201d87
Merge "Make the main script load on-demand"