Switched to getopt for parsing cmd parameters, preparations for 1.1 release