Changed startup script to be more general, and add configuration