v0.4.0: numerous improvements and feature additions