Code clean up regarding old entity code. Closes #52.