new parser for handling nested optional segments
updated TODO in the readme
version bump to 0.4.0