Fixing a few things and releasing v0.4.0