Refctor optional services