General improvments, added documentation.
Initial effort on programming assignment for algo.