queries: implemented insert() [closes #11] & tests reafactoring with fixes