Updated all the code and mysql stuff