Functions for dealing with input lists mostly!
Added the main functions that we need to manipulate input lists.