Added protection from ItemFrames and Vehicles. Also some code reorganisation