initial implement of unit entity and general stats, refactors