Add README, and rearrange code.