Clean up register stuff