Added a argument parsing and the basis of error handling.