Major code write. Settings logic is implemented.