Improvements and Bugs fixing