Reindenting, modularize io and playBack.