Clean up code using ternary operator on line definition; add rotation functionality to li:hove