Added various configuration values, added support for different modes