Implemented a functional prefs implementation
Added missing license header