Clean up in the utils

Signed-off-by: oleg komarov <o.komarov11@imperial.ac.uk>