Added IEntity file; cleaned up the main class.