Refactor code

Signed-off-by: MKRussel <russel@smitsol.com>
Issue #SMARTCMS-53 - Existence of workspace is not checked when creating a content

Signed-off-by: MKRussel <russel@smartitengineering.com>