Closing in on finishing input

Accounting for the vast multitude of cases. Also put in update query to
be used when appropriate