Fixed amsstore.sql (indexes, weird foreign key thing)
No major changes
Merge branch 'master' into Thomas