Removes excess whitespace and fixes relative js paths