Added state system and template resource holder, refactored and improved tile editor and imrpoved the way block data is used