Refactoring and extending
Adding options functionality