Updated some code 2014-11-24 By MACZ