Cleanup and improve design