Fixed some derivative errors.
Improved expression formatting.
Renamed namespaces.