Cleanup and few improvement