Added new table to sqlite database for storing fv/pv "StateEvents"
refactored sql insert code
commit before branch to change sqlite updates to batch mode