refactored meterdevice and cleaned up classes