Bug fixing
Restructuring, cleanup