cleaning up the js and clearing width from fit-fill function