Add logic to IndigoMain, refactor InpurWindow and Parser