finished up sync command, cleaned up code. Should work in theory... Time to test!