Add a lot of goodies
Restructure code