Added exceptions and Junit Testing to building