ERT-564 Clean up code