Partially implement argument parsing

Also introduces logging