Update to 0.5.0 and update example code