Moved function for initialization to settings