Added flex module. Other fixes.