More implementation of low level calls.
Added function prototypes.