Added class for mele unit. Optimized inheritance slightly.