Several improvements to pass w3c validation