Added configure script. Some interface fixes