Add Insert query, refactor