Start sql, core framwork comment logic

Framework at the moment. Includes outline in commends of main logic.