Adds xAPI classes and fixes tests.

Fixes #464.