miyagi: Combine utility functions into one file

Signed-off-by: Aleksi Pitkäjärvi <aleksi.pitkajarvi@aalto.fi>