Exceptions on errors, couple of new functions