modularizing python + redesign language model