Bugs fixes, code cleaned, and prepare new features