Refactored the example website code and made several other code improvements.