Cleaned up external functions. Updated man pages.