fix insertion and update trxs
rearrange source code structure
implemented support for simple queries