Updated some code 2014-11-14 By MACZ