Updates

Adding functions to sql and core