Update Controller

Sanity check for datatypeid, improved sql, check valid media.
Update Property Editor

Support for pre value Datatypeids, add check for sane media node.