Fixed JS formatting and improved text layout