added scaling text, fits to y dimension; formatted js