Initial commit from Mantis ticket 15 (Shayan Yassami & Tong Wu)