Added revision table info to the sustainer entity and started to extra database queries from sustainer functions.