Fixed minor typos, improved field attributes generation