improved ordering things

better solution using serialization
galleries can be moved too
bugfixes