start gap wear leveling and preset support have been added and tested. cleaned up the code to removed debug print statements as well