Fixed some errors, still need to get mcrypt iv shit