Removed closing php tag from lib and pages

Removed the php closing tag and cleaned up white space at end of file.