Refactored Unit class
Moved constants to Utils
Added database update methods