Fixes and reorganization