technical improvements and bug fixes