Issue197

Cleaned up the more JSHint. Incorporated Dom's technique to separate HTML and javascript