Fixed visibility, methods and variables

Fixed a host of small things, such as bad private method calls, bad
option variables references. Added Sitemap human readability with
newline chars. Made all inclusion requirements at the top of the file.
Declared explicit variable & method visibility for php 5+.
Merge pull request #1 from zmonteca/master

Fixed methods visibility and incorrect method & variables access