Cleaned up codebase for mobile factories, and modularized settings