Settings: Make setting entry group and values mutually exclusive

This greatly reduces the complexity of Settings code.
Additionally, several memory leaks were fixed.