Implemented select function

Select function now generates html selects. Also added protected helper function optionTag to generate html options.