Added missing GPL headings
Removed debug code
Changed redundant spaces in code files
Reordered code, put a public method to public section