Typos
Moving javascript to component so it works properly