cleaned up Device.erb boilerplate