clean up modbutton spaghetti, fix that bug for agentlame