Did you consider querying both settings in a single function?  You could probably do them both with a single createLock() call, though I don't know if that would make anything more efficient.  If you are always going to query both at startup, consider combining these functions.