Fixed references for tests

Tests pass and work. Also added documentation. Fixes #2