Remove duplicate method declaration
Cast unsigned longs to ints when using uregx functions to remove build warnings.
Correct Memory Leaks reported by analyzer