Removed old commented out code, improved bitrate calculation