Refactored Thrift stuff.
Added Thrift file for mobile device registration.