code clean up and starting to add some options