Clean up some unused constants.
Variable and type fixes.