the init function does too many tasks here.
I suggest to have render and view(template) function, refering BaseUI.