Minor cleanup and moving around code for clarity

Adding a couple of tests to cover some cleaned up lines.

Change-Id: I1a4a73694f16a35967c313625bc4260045500ab9
Imported Translations from Transifex

Change-Id: I4613e090c1ea09419d1896b374f0fa6458faf3e0
Merge "Minor cleanup and moving around code for clarity"
Merge "Imported Translations from Transifex"