Slight functionality changes. Test file

Changed the internal operation of the volume control related functions.
Added a test file covering power and volume tests.