Fixed some duplicate entity bugs. Committing before I ruin the whole
project.