improving inheritance model and a lot of coding in the Jelly class