Fixed the last stuff, only needs some proof checking.