Add prototypes and documentation to header