Simplify code for creating new units

Signed-off-by: Michal Čihař <michal@cihar.com>
Simplify defaults handling

Signed-off-by: Michal Čihař <michal@cihar.com>