Add plug-ins for datatable and for select box

Add unit tests and add tidy up some code plus bug fixes