Further code improvements