2nd checkin

added readme, codebook, and cleaned up the code