Cleaning up some code to make it more readable.
Volume appears to work now.