Renaming functions

No semantic change
A bit of fixup and cleanup of memory usage
Initial addition of memory usage dumping to SQL
Adding information about prerequisites

Thanks to Benjamin for the idea