don't use the edge name but its type as type...
SRelation#getSName is not the component name
output proper doctype
use CSS for styling instead of HTML attributes
fixing endless loop caused by an error when adjusting the condition