Merge blocks if neccessary
TMP COMMIT: (not compiling) started implementing partitioning