Added main program loop shell