Updated few methods to use sqlalchemy query rather than _construct_query.