Fixed Functionality

-- something I had done broke the string padding, so I just dropped in
the old JavaScript. Going to attempt to clean up again now.