Fix phpcs issue, move function as per context, rename chosen references with select2 #278 #251