Bug fixes and constants added