added a parse method that returns a context typed value, also fixed the
constructors.