Added framework for main logic.
Updated