Restructure prefrences setup scripts