Big changes to script code

Now checks when data was modified, syncs file list with remote, and
other cool stuff.