updated api and editor

updated api to enable classes to be create and encoded

altered editor to use new api functionality