Modularized the source.