Refactorization/engines

Refactorize logic for workshop engine.

Already reviewed by @vicmaster and @zalapeach
Space found before comma.<br>Trailing whitespace detected.