Better modularization and update README