added some css tweaks & programmatical checks