Minor cleanup of constants and code