added ref parameter. translated to coffeescript. added form validation. remove unnecessary files.