Added some structure and typeplate