Adding sources.

Cleaned up the sources, only keeping library specific stuff, trying to
clear out application specific stuff.