adjust changing main unit
add rails validation
remove unnecessary comments
Merge branch 'ph6_dev' into ph6_review