Reapplying realex gateway addition changes

@davidjrice fyi -- I reapplied your changes against most recent master. 
This method seems a little redundant