Cleanup and improvement