Border functions for PrimeScreen (replace and reset)
Added automatic border recognition to PrimeScreen based on MarchingSquares