Move settings handling to another file
Separate read/write lock