Move switchery UI code to new JS files