added localization and other small clean up things