Improved some functions and added debug
Fixed readme