Added 'submit' mode, fixed some configuration file issues