Fixing lots of typos and incorrect codes

Aka now the component works.