Added prototypes.

Added some protytpes as well as some conflicts have been solved.