Refactor classes.

Refacrored classes: LengthActivity.java, MemoryActivity.java,
TemperatureActivity.java, WeightActivity.java.