Added code to handle empty file cases. Moved HTML and CSS out of main support scripts. Fixed other minor bugs.