Remove entities entirely

They're quite complex, and we don't need them yet.
Fix indentation
Refactor periodically function