Several bug fixing and imporvements, readme updated