Added settings parameter and default settings