Reworked Visitor to allow return values.
Added basic php scalars.