added changeable configuration
added handler interfaces
reformatting to fit conding style