Working version 1.0.0 release. Needs optimization.