Restructured code base into core and demo modules