Parsing useful info from input