Adding sqlite and fixing some minor issues