Cleaned up barometer implementation.