Updated selectpicker function to fix #683
Updated internal layout of the plugin