Adding command-line switches and general switch support