Added exception and foreach in std2. Also added examples.