Added variable table. Bases and variables are now fetched from db