Add get_latest_revision.
Move functions.sql file.
Add prunify.