Updated to reflect changes in API.
Version bumped to 0.4.0.