Use init method to initialise the elements instead of setParent