Give some more security 2 : protect printed variable
Add comment, remove unused php end tag, and add functions file