Added connection test button (enhancement #1) and small code corrections