Fixes and new global class structure