Moved error checking to new header.
Fix comment URL.
Clang 3.5
Changed syntax from throwing errors explicitly to assertions.