[WIP] Restructure

* RecordBase.define becomes ks.defineResource
  - No more prototype chain for no reason
* Move store into module