Added autoconfigure support

