Major refactoring
Delete some circular dependencies due to refactoring
Adding news devices
Adding metric API