Finished the settings and preference implementation.