Clean Up

Separated functions from header files, leaving declarations. Accounted
for this in all source files.