Some bug solved and some functions updated.