Writing confirmed to be working and got added to the testcases

I found a few issues with it, but these are now resolved.

Signed-off-by: Toon Schoenmakers <nighteyes1993@gmail.com>