Changed class files

rearranged the layout of the index page and the class files.  did code
for roles object to be used in a snippet.  Also made notes for all
globals in index.php page and added a query count variable.