Added some argument checking and a TODO