Wip 1.0 cleanup

Cleans up warnings in Pattern and adds several missing comparison functions.