optimised state handling
sync now returns the correct status if folder is not found
modify state handling to allow optimizations
optimized state creatio
use msgpack to serialize state
cleanup