Changed options parsing to getopts