Input parsing for main env