Added throw and did some work on exceptions