Implementing optparse