Improve start up process

Improves start up process and cleans up start up code. Includes improved parameter processing.