Abstracted the item handling code, also made both the block and item handlers fully statically typed (finally).