wrapped entire script in document.ready(). Created function to format floats to represent currency. Added type checking on many return values.