Removed unused code which generates PHP warnings