Added a few options. Also, refactoring