Add some functionality, switch from getopts to better.