refactored robot,java and phonegap boxes