Solved incorrect problem last commit. Partial rewrite complete