Code rewrite and adding select2 script and files