Small fixes and reorganization