add grunt task
more modularization and testing