fixed border width when cli is free/float/full, also cleaned code