Modularize repository. Fix #1.