Further code cleanups