Add ability to evaluate trees remotely
Refactor DB insert method

Instead of having a long SQL query string, the query string is built
from a python dictionary.