Swapped getopt for manually parsing argv to better meet specifications. Warning: code currently does not compile.