cleanup of code and new function for finding menu wedges