Autoconfigure if needed

Closes #26