Fixed default settings logic and cleaned up comments.