Rename test to examples, move the functions to the bottom, add function prototypes.