renamed parameters and reformatted insert function
added test notes and tested some memory stuff