Core code improvements