Fixed bug with saving settings.

Settings will no longer be saved if they were never loaded in the first
place.
Adding the profiler and starting working on automatic model validation.