Refined parsing of socket input by introducing a parseInput method that takes an implicit String (implicit conversion of ByteString to String in trait Implicits) and returns either a parsed Integer or the raw String. This method then again is matched for "exit", Int or a unparseable String