Various improvements and changes