Complete rewrite
Restructure and rewrite