more cleanup on settingsForm, implemented FK error handling
more cleanup and beautification