Removed dependency on boost::regex. Further tweaks and clean-up.