starting to refactorate Main
adding error checking
creating a module for functions over categories and moving code into it
testing behavior or resolve on URI
adding some tests about Enum