Initial commit.

First set of structures and algorithms.