Some improvements and changes