Massive refactoring, introduced lua driven brains for all entities.