Added options parsing, daemonization.