Added basic function prototypes.
Implemented basic functions.