Verified and documented DCT code. Fixes #130