More separation of items in template
Fixed a critical nullpointer bug