Added preg_quote and doc blocks