First attempt to incorporate new marker detection code