Refactor; Syntax cleanup, Naming changes, Memory Management fixes

I've modernized the code a little bit, (there is a lot more to do), cleanup up memory issues. Standardized syntax across files.

Needs testing before merge.