started cleaning up preference activity. Needs further refactoring badly