Add types, fix template, better console