Got the _average Function working

Also, made ' a legal delimiter for HTML attributes.