Add install code, fix few build issues
Add man pages and fix few tiny API issues