Changed retrieve_pattern and retrieve_username so they don't keep reading if the ! or # characters are not found.  Instead they stop at 20 values.