Added initial add functionality. Doesn't currently update the .idx file