cleaned up some code

I just renamed  and reordered some code to clean it up. also added some
string resources to replace some hardcoded strings.