Fix for case-sensitive systems
Remove pass-by references and made functions compatible with parent (fix for php 5.4)