Added single-line tests, example and some patch for firefox