Initial Setup. Faster algorithms to come.