Added options parsing and functionality.