Cleaned up all my code and added signifigantly more commenting. Fixed some error checking about audio type.