Cleanup in base and layout