Updated some definitions, fixed file layout.