Initial refactor
Initial refactor

* main() passes arguments to devsite() and does basic checks and
  sets up variables.
* devsite() calls out to helper functions to perform most tasks.

Cottser/devsite