Simplify JS code, and put eliipses CSS actually into CSS