First commit.

Added first version with messy, but working implementation.