Fix for #215 and some other related improvements

This regenerated using the fixed `spec/parser.php`, is it okey like this @kernins?