Many fixes, added configurable settings in the control panel