added argument parser and more exceptions