Bug fixing and added a simple documentation