Updated some code, Main client and some fixes