Moved simple patch algorithm to different module