move the seekbar code into a new file; fix writing metadata to json;