rewrite snippet generation, add better README

added to README, and modified the way the snippet file was generated…