reordered some member fields
tweaking
added missing license headers