Code Cleanup

Merge some files, removed most of the G-Table, seperat functions and
streamlined some functions