Implement exception system

Very basic and needs to be extended, but it will serve its purpose.
Close #105