dewi.main: add type annotation & last newline
utils: add algorithms and format modules