Fix some issues

Nice type signatures