Cleaning up and organizing code better for localizr task