Clean up code, hide elements until data are ready