Updated some code 2014-11-5 By MACZ