Replace mode feature ready for use

Working as intended, some bugs may still remain.