Added CSV import, fixed #1186. Also cleaned up motion and user CSV import.