Added specific custom exceptions and refactored code
get active methods
code refactor for clarity