Syntax fixes - static methods, call by reference and undefined variables