Changed way of checking if an item is a block item
Thus fixing part of #66 and #61
(also some formatting)