Rework insert() to be more clear
Add cfg(test) around mod test so it only gets compiled for tests