Cleaned up the code now that collision is improved.