Improving separation of code and configuration

Added startup script for dev use
Configured feature flags instead of lots of environment switches