Code cleanup
Restructure.