Added in memory implementation as default

Also refactored the different implementations