Update coding styles, somes functions somes bugs and add somes littles functions