finalizing palipainting and fixes the navbar spacing