added css and optimized conditionals

added css and optimized conditionals