Corrected some behavior problem and tweeked styling