Added transaction scripts, completed entities and db methods