Added exceptions

For future use (validation of input etc.)