adds css/js to style errors in red
refactors js to handle empty commands better