Huge release. second full rewrite