added user interaction checks on ConfigureSecProxy event, tidied and organised some code