Finalised the flexible element implementation