1. some changes for rails foundation's framework.
2. change event pics logic.