moved sites array to global scope
cleanup
Merge pull request #1 from peterander/master

Pete's changes