Trying out some new things

The internal buffers are only pulled out when they're actually needed, some of the if statements were rearranged, and added a Merge function to see which parts of the code are duplicated. This will obviously be cleaned up a lot before release.