Cleanup and fixing