Add documentation of functions
Add help option
STDIN check after getopts
Clean up getopts