add css and javascript to system, and protection from the infamous document.write