Added on database change listener
Added training timer