Cleaning up code, and separating a little to allow native code to share

UCC git Repository :: git.ucc.asn.au