Address #249 + some additional bug fixes - see commits

Hi jhy,

I made some changes to improve the FormElements implementation. Missing elements get included, and there was one possibility of duplication that I fixed.