Split code in three modules.