A lot of fixes and added fuctioanalty

Added option to set DATA IN and DATA OUT addresses in settings to allow
flexibility