Functional version, including settings page