Split Open/Close and Lock/Unlock into own source files.