Big restructure
Nearly working.2
Restructuring and using handlers.