change domain scope to auto
add support for reading options from database