added a few of Emy's changes plus a few others
Merge branch 'qing-guo' of https://github.com/elin9/TeamMIA into qing-guo