Implemented a preferences window