Adding Option support + refactoring