Made init more dynamic to set any attribute including nested and complex