Save profiles, fixes #22