Merge pull request #2 from hintjens/master

Problem: implementation is lagging behind the spec
Merge pull request #3 from hintjens/master

Added note to clarify policy for embedded apps
Code fixes per Laurent Alebarde's review