Re-implemented by directly using Ajax; reformatted HTML