The code is meant to be used as a cmd line tool but should export some functions so it can be used as a go package