implements `info` command - closes #1

also reorganises a bit.