IN PROGRESS - issue NE-4: Refactoring 
https://anyflow.atlassian.net/browse/NE-4