unused variable removed.
constants added.