added first and nullable, tested with html & unhygienic
lots of comments added. started follows